home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
JCSM Shareware Collection 1993 November
/
JCSM Shareware Collection - 1993-11.iso
/
cl720
/
prolc1j.lzh
/
DIR_IO.C
< prev
next >
Wrap
Text File
|
1992-08-22
|
594b
|
34 lines
#include <stdio.h>
#include <dos.h>
#define FALSE 0
#define TRUE !FALSE
#define WORD unsigned int
void setDTA(BufPtr)
WORD BufPtr;
{union REGS reg;
reg.x.dx = (WORD) BufPtr;
reg.h.ah = 0x1A;
int86(0x21, ®, ®);
}
int FindFirst(FilePtr)
int FilePtr; /* file spec */
{union REGS reg;
reg.x.dx = FilePtr;
reg.h.ah = 0x4e;
reg.x.cx = 0;
int86(0x21, ®, ®);
if(reg.x.cflag) return(FALSE);
else return(TRUE);
}
int FindNext()
{union REGS reg;
reg.h.ah = 0x4f;
int86(0x21, ®, ®);
if(reg.x.cflag) return(FALSE);
else return(TRUE);
}